/**
 * @file   TAG003Msg.java
 * @date   2012-11-14下午11:46:58
 * @author User
 */
package com.gzceb.zhgjj.model;

import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


import com.gzceb.zhgjj.util.SpringContextUtil;
import com.gzceb.zhgjj.util.Utils;
import com.gzceb.zhgjj.util.XMLUtils;

/**
 * <p>字符串实用类。</p>
 *
 * @date   2012-11-14下午11:46:58 
 * @author User
 * @description 
 */
public class TAG003Msg extends AbstractMsg {

	private  final Log logger = LogFactory.getLog(TAG003Msg.class);
	
	public String destPath;
	
	public TAG003Msg(String destPath){
		this.destPath = destPath;
	}
	
	/* (non-Javadoc)
	 * @see com.gzceb.zhgjj.model.AbstractMsg#ProcRcvMsg(java.lang.String)
	 */
	@Override
	public String ProcRcvMsg(String message) {
		message="123";
		return message;
		
		/*
		//TODO 需增加成功标志的判断
		String sucFlag;
		// 需读取数据库信息返回
		String rspStr="";
		
		logger.info("got the message: " + "\n" + message);
		Map<String, String> msgMap = XMLUtils.XMLParser(message.toString());
		String contCode = msgMap.get("CONTRACT_CODE");
		
		LoanAprvService las = (LoanAprvService) SpringContextUtil.getBean("loanAprvService");
		rspStr = las.getLoanStat(contCode);
		if(null == rspStr){
			sucFlag = Constants.SUC_FLAG_FAIL;
		}else{
			sucFlag = Constants.SUC_FLAG_SUC;
		}
		//TODO 需增加响应代码的判断
		String respCode = Constants.RESPCODE_SUC;
		rspStr = "<message>"
				+"<head>"
				+"<Tx_code>" + Constants.TXCODE_TAG003 + "</Tx_code>"
				+"<BankId>" + Constants.BANKID + "</BankId>"
				+"<TallyDate>" + Utils.getCurrDateStr("yyyyHHdd") + "</TallyDate>"
				+"<Spe_jnl_no></Spe_jnl_no>"
				+"<VoucherNum></VoucherNum>"
				+"<Suc_flag>" + sucFlag + "</Suc_flag>"
				+"<RespCode>" + respCode + "</RespCode>"
				+"<RespMess>Successful</RespMess>"
				+"<Servertype></Servertype>"
				+"</head>"
				+"<body>"
				+"<CONTRACT_CODE>" + contCode + "</CONTRACT_CODE>"
				+"<AprFlag>" + rspStr + "</AprFlag>"
				+"</body>"
				+"</message>";
		
		return Utils.intToString(rspStr.length(), 4) + rspStr;
		*/
		
	}

}
